package com.akaovi.pojo;

/**
 * @author akaovi
 * @version 1.0
 * @description
 * @date 2022/11/7 14:14
 * @since 2022/11/7 14:14
 */
public class BasePlusSalesEmployee extends SalesEmployee implements OthersPay{
    private double baseSalary;

    public BasePlusSalesEmployee(String name, int birth, double sales, double pre, double baseSalary) {
        super(name, birth, sales, pre);
        this.baseSalary = baseSalary;
    }

    public double getBaseSalary() {
        return baseSalary;
    }

    public void setBaseSalary(double baseSalary) {
        this.baseSalary = baseSalary;
    }

    public double getSalary(int month) {
        return baseSalary + super.getSalary(month) + overtimePay();
    }

    @Override
    public double overtimePay() {
        return 1000.0;
    }
}

